using UnityEngine;
using System.Collections;

public class InimigoBolado : MonoBehaviour {
	
	public float velocidade = 6.0f;
	public Transform player;

	// Use this for initialization
	void Start () {
	
	}
	
	// Update is called once per frame
	void Update () 
	{
		float dir = (player.position.x-transform.position.x);
		if(dir >= 0) dir = 1;
		else dir = -1;
		transform.Translate(Time.deltaTime * dir * velocidade, 0, 0);
		
	}
}
